package com.gitee.huxing.course.core.datasource;

import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;

/**
 * @Description: 多数据源路由管理
 * @ProjectName: JavaCourse
 * @Package: com.gitee.huxing.course.core.datasource
 * @ClassName: MultipleDataSource
 * @Author: huxing
 * @DateTime: 2021-09-16 上午10:59
 */
public class MultipleDataSource extends AbstractRoutingDataSource {

    @Override
    protected Object determineCurrentLookupKey() {
        return DataSourceContextHolder.getDataSource();
    }
}
